home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 2 of 2).iso
/
cheats
/
cheet39
/
install.dat
/
1OPTIP39.TXT
< prev
next >
Wrap
Text File
|
1995-03-07
|
4KB
|
116 lines
~Today's Top DOS Tip
Finding 'lost' files in a mass of directories! - By Simon Burrows
~`Introduction
~`────────────
`It seems unlikely that there's anyone out there that hasn't
`encountered the 'lost' file phenomenon before. You know the sort
`of thing I mean: you know exactly what the name of the file you
`need is, but you can't remember which directory you have left it
`in. With this fact in mind, I find it difficult to believe that
`Microsoft haven't included a utility with their latest DOS
`package which will search for the name of the lost file you
`specify and inform you of its location. The plain fact is that
`they haven't, however, so you're gonna have to sort something out
`for yourself....
~`Method and Examples
~`───────────────────
`The best way I have found to do it is to use the CHKDSK utility
`with the /V command. Used on its own, this will display a list
`of every single file on the current drive with a full path for
`each file. Since this isn't quite what we're looking for, you
`need to 'mix' this command with the FIND filter to make CHKDSK
`display only those files on the current drive with the name you
`specify.
`Here's an example. If you type this at the DOS prompt it will
`list all the files on the current disk with the name "CHEET.EXE"
`together with their locations :-
~CHKDSK /V | FIND "CHEET.EXE"
`When doing this you must remember that the name of the file you
`are searching for (ie, the part in " "s) must be in capital
`letters because the FIND filter is case-sensitive.
`Doing this each time you wish to find the location of a file,
`however, can be a bit cumbersome (hey, long word!) so it's
`worth making a batch file to do the job for you. Even better,
`once you've made this batch file, copy it into the DOS directory.
`Doing this allows you to load the utility from whichever
`directory you are in, just typing its name.
`Here's what the batch file needs to look like :-
~CHKDSK /V | FIND "%1"
`Type this into a text-editor such as MS-DOS Edit, then save it as
`something like "FINDME.BAT". To get it to work now, simply type
`"FINDME" followed by the name of the file you want to find. For
`example, if you couldn't remember which directory you had
`installed DOS in, and you needed to use DOS's FORMAT command, you
`could type the following to find the location of FORMAT.COM :-
~FINDME FORMAT.COM
`You must remember, though, that when you load the batch file, the
`name of the file you want to search for must still be in capital
`letters (like the "FORMAT.COM" part of the example above)
`otherwise your search will be fruitless!
`To make this batch file even more user-friendly you could add a
`feature which allows you to specify which drive you want to
`search for the 'lost' file in. To do this you might use the
`following batch file :-
~CHKDSK %1 /V | FIND "%2"
`To use this to find the file "EDIT.EXE" on drive D:, you would
`type the following from the command line :-
~FINDME D: EDIT.EXE
`What makes this even better is that if you don't specify a drive
`to search, it will search the current drive.
`NOTE: This method of finding lost files will also inform you of
` files which have the name of your 'lost' file included in
` their longer names. For example, assuming you have got
both files on the disk you are searching, if you search
for "FORMAT.COM" you will also be told the location of
"UNFORMAT.COM" since the name of this file contains the
text "FORMAT.COM" which you searched for. Similarly, if
you did a search for "EDIT.EXE" and you had files called
"PATHEDIT.EXE" and "SYS-EDIT.EXE" on the current disk as
well, all three files would be reported to you by CHKDSK.
~Guten Apetit!....
` ─────────────
~` Simon Burrows
` ─────────────